package com.dzx.currentency.threadlocal;

/**
 * @author DuanZhaoXu
 * @ClassName:
 * @Description:
 * @date 2018年11月19日 17:37:13
 */
public class RequestHolder {

    private final static ThreadLocal<Long> requestHolder = new ThreadLocal<Long>();

    public static void add(Long id) {
        requestHolder.set(id);
    }

    public static Long getId() {
        return requestHolder.get();
    }

    public static void remove() {
        requestHolder.remove();
    }
}
